package com.neusoft.neuiotms.dcam.fixed.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@Setter
@ToString
@Entity
@Table(name = "neuiot_connection_relation")
@org.hibernate.annotations.Table(appliesTo = "neuiot_connection_relation", comment = "其他业务关联表")
public class ConnectionRelation extends AbstractModel {

    private static final long serialVersionUID = 1L;

    @NotBlank(message = "业务ID不能为空")
    @Length(max = 255, message = "业务ID不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NULL COMMENT '业务ID'")
    private String businessId;

    /** 业务名称 */
    @Length(max = 255, message = "业务名称不能超过{max}位")
    @Column(length = 255, nullable = true)
    @Comment("varchar(255) NULL COMMENT '业务名称'")
    private String name;
}
